export const setRem = () => {
  // 获取屏幕尺寸
  const width = document.documentElement.clientWidth;
  // 设置html字体大小
  document.documentElement.style.fontSize = width / 24 +'px';
  // console.log(document.documentElement.style.fontSize);
}
setRem();

// 屏幕尺寸发生改变
window.addEventListener('resize', setRem)
window.onresize = ()=>{
  setRem();
  console.log('屏幕尺寸发生改变');
}
